<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
/*    
let list = [1,2,3]
let num = 0 

let list2 = list //复杂数据类型,地址
let num2 = num //基本数据类型,值

list2.push(4)//影不影响原来的list->影响
num2++ //影不影响原来的num->不影响

console.log(list)//[1,2,3,4]
console.log(num) 0
*/

let list = [1,2,3]
let num = 0 
// 方法的传参,隐式赋值
function fn (l, n) {
    //l赋值地址
    l.push(4)
    //n赋值值
    n++

}
fn(list, num)

console.log(list) //[1,2,3,4]
console.log(num) //0

</script>
</html>